-
Notifications
You must be signed in to change notification settings - Fork 5.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix cholesky doc, test=develop #25250
Conversation
Thanks for your contribution! |
❌This PR is not created using PR's template. You can refer to this Demo. |
python/paddle/tensor/linalg.py
Outdated
@@ -478,9 +478,11 @@ def dot(x, y, name=None): | |||
|
|||
with fluid.dygraph.guard(): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
使用paddle.enable_imperative开启动态图。
英文文档里也先把 or LoDTensor
给删除吧,动态图现在都不支持LoDTensor。
在FluidDoc里加一下dot的中文文档。
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK, done
python/paddle/tensor/linalg.py
Outdated
@@ -682,14 +684,17 @@ def cholesky(x, upper=False): | |||
|
|||
with fluid.dygraph.guard(): | |||
a = np.random.rand(3, 3) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
使用paddle.enable_imperative开启动态图
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok, fixed it.
@@ -1165,20 +1165,17 @@ def inverse(input, out=None, name=None): | |||
(2-D Tensor) or batches of square matrices. | |||
|
|||
Args: | |||
input (Variable): The input Variable which holds a Tensor. The last two | |||
x (Variable): The input Variable which holds a Tensor. The last two | |||
dimensions should be equal. When the number of dimensions is |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The input Variable which holds a Tensor. --> The input tensor.
现在概念上是不是Variable holds tensor,还不明确。。。
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok, fixed it.
Variable: A Tensor holds the inverse of input. The shape and data type | ||
is the same as input. | ||
Variable: A Tensor holds the inverse of x. The shape and data type | ||
is the same as x. | ||
|
||
Examples: | ||
.. code-block:: python |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
示例代码只保留动态图版本即可。
用paddle.enable_imperative开启。
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok,fixed it
python/paddle/tensor/linalg.py
Outdated
@@ -476,11 +476,13 @@ def dot(x, y, name=None): | |||
import paddle.fluid as fluid |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
no need to import fluid
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
python/paddle/tensor/linalg.py
Outdated
@@ -648,7 +650,7 @@ def cross(input, other, dim=None): | |||
return out | |||
|
|||
|
|||
def cholesky(x, upper=False): | |||
def cholesky(x, upper=False, name=None): | |||
""" | |||
:alias_main: paddle.cholesky | |||
:alias: paddle.cholesky,paddle.tensor.cholesky,paddle.tensor.linalg.cholesky |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"," -> ", "
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
python/paddle/tensor/linalg.py
Outdated
@@ -680,17 +682,16 @@ def cholesky(x, upper=False): | |||
import paddle.fluid as fluid |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
no fluid
python/paddle/tensor/math.py
Outdated
@@ -1155,7 +1155,7 @@ def logsumexp(x, dim=None, keepdim=False, out=None, name=None): | |||
return layers.log(sum_out, name) | |||
|
|||
|
|||
def inverse(input, out=None, name=None): | |||
def inverse(x, name=None): | |||
""" | |||
:alias_main: paddle.inverse | |||
:alias: paddle.inverse,paddle.tensor.inverse,paddle.tensor.math.inverse |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"," -> ", "
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
python/paddle/tensor/math.py
Outdated
@@ -1188,45 +1185,29 @@ def inverse(input, out=None, name=None): | |||
import paddle.fluid as fluid |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
no fluid
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
PR types
Others
PR changes
Docs
Describe
fix the doc of cholesky